package com.zy.ems.common.enums;

public enum InvoiceType {
    //
    person(1, "个人", false),
    //
    company(2, "公司", false),
    //
    no(3, "不开发票", false);

    private int id;

    private String text;

    private boolean disable;

    private InvoiceType(int id, String text, boolean disable) {
        this.id = id;
        this.text = text;
        this.disable = disable;
    }

    public static InvoiceType[] getAllInfo() {
        return values();
    }

    public static InvoiceType getInfo(int typeId) {
        for (InvoiceType type : values()) {
            if (typeId == type.getId()) {
                return type;
            }
        }
        return no;
    }

    public int getId() {
        return id;
    }

    public String getText() {
        return text;
    }

    public boolean isDisable() {
        return disable;
    }

}
